package base.core.spring;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import org.springframework.transaction.annotation.Transactional;

/**
 * Pengwei
 * 2022/7/28 16:57
 */
@Transactional(rollbackFor = Exception.class)
public class BaseService<M extends BaseMapper<T>, T> extends ServiceImpl<M,T> {

    public LambdaQueryWrapper<T> getLambdaQuery() {
        return Wrappers.<T>lambdaQuery();
    }

    public LambdaQueryWrapper<T> getLambdaQuery(T t) {
        return Wrappers.<T>lambdaQuery(t);
    }
}
